/**********************************************************************
Copyright by FFCS, 2006-09-26
File Name: caller.cxx
Create Date: 2006-09-26
Author: CallerGen
Version:
Description: 
Last Version Date:
Version Date:
Modifications Since Last Version:
**********************************************************************/
#include <string>

using namespace std;

#include "base_type.h"
#include "message_define.h"
#include "caller.h"
#include "target.h"

int CallerForPpmProcOrd::callByMessage(
                                    long l_message,
                                    BaseType& cl_1,
                                    string& str_2,
                                    string& str_3
                                    )
{
  PpmProcOrdFlowProcessor cl_target;
  int n_ret = 1;
  
  switch(l_message)
  {
  case MSG_PPM_PROCORD_00:
    n_ret=cl_target.skip(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_PROCORD_01:
    n_ret=cl_target.createProdOrd(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_PROCORD_02:
    n_ret=cl_target.procOrdTransfer(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_PROCORD_03:
    n_ret=cl_target.procOrdCancel(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_PROCORD_04:
    n_ret=cl_target.procOrdCancelBack(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_PROCORD_05:
    n_ret=cl_target.procOrdComplete(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_PROCORD_06:
    n_ret=cl_target.procOrdResound(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_PROCORD_07:
    n_ret=cl_target.procOrdResoundBack(
      cl_1,
      str_2,
      str_3
      );
    break;

  case MSG_PPM_PROCORD_08:
	  n_ret=cl_target.dealProdOrd(
		  cl_1,
		  str_2,
		  str_3
		  );
	  break;
  }
  
  return n_ret;
}
